﻿using Fast;
using Fast.Extensions.Caching;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class DistributedCacheServiceCollectionExtensions
    {
        public static IServiceCollection AddFastDistributedCache(this IServiceCollection services)
        {
            services.AddSingleton(typeof(IDistributedCache<>), typeof(DistributedCache<>));
            services.AddSingleton(typeof(IDistributedCache<,>), typeof(DistributedCache<,>));

            services.AddConfigureOptions<FastDistributedCacheOptions>();
            return services;
        }
    }
}
